| Conditions | 1 |
| Paths | 1 |
| Total Lines | 34 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | |||
| 2 | module.exports = { |
||
| 3 | decideBlackListWhiteList: function (inDecisionValue, inEvaluatedValueForBlackList, inBlackListArray, inEvaluatedValueForWhiteList, inWhiteListArray, inValueToEvaluate) { |
||
| 4 | var outResultBoolean = false; |
||
| 5 | if (inDecisionValue === inEvaluatedValueForBlackList) { |
||
| 6 | if (inBlackListArray.indexOf(inValueToEvaluate) === -1) { |
||
| 7 | outResultBoolean = true; |
||
| 8 | } |
||
| 9 | } else if (inDecisionValue === inEvaluatedValueForWhiteList) { |
||
| 10 | if (inWhiteListArray.indexOf(inValueToEvaluate) > -1) { |
||
| 11 | outResultBoolean = true; |
||
| 12 | } |
||
| 13 | } |
||
| 14 | return outResultBoolean; |
||
| 15 | }, |
||
| 16 | buildRequestQuery: function (targetSharePointURL, crtListName, queryType, headerOptions) { |
||
| 17 | var queryPrefix = ''; |
||
| 18 | if ((queryType === 'Fields') || (queryType === 'Items')) { |
||
| 19 | queryPrefix = '_api/web/lists/GetByTitle(\'' + crtListName + '\')/' + queryType; |
||
| 20 | } else if (queryType === 'Lists') { |
||
| 21 | queryPrefix = '_api/web/' + queryType; |
||
| 22 | } |
||
| 23 | return { |
||
| 24 | url: targetSharePointURL + queryPrefix, |
||
| 25 | headers: headerOptions, |
||
| 26 | json: true |
||
| 27 | }; |
||
| 28 | } |
||
| 29 | } |
||
| 30 |